package com.wfms.service;

import com.wfms.bean.User;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * Created by Administrator on 2017/12/24.
 */
@FeignClient(name="noEureka",url = "http://localhost:9090")
public interface UserServiceNoEureka {

    @GetMapping("/eureka/user/{id}")
    public User findById(@PathVariable("id")int id);

    @PostMapping("/eureka/user/")
    public User saveUser(@RequestBody User user);
}
